package com.yc.qunxing.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yc.qunxing.entity.Drivers;
import com.yc.qunxing.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yc.qunxing.entity.vo.OrderDetails;
import com.yc.qunxing.entity.vo.OrderDetailsDriver;
import com.yc.qunxing.entity.vo.RouteFrequency;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 鹏哥
 * @since 2024-05-23
 */
public interface IOrdersService extends IService<Orders> {

    Integer addOrder(Orders orders);


    List<RouteFrequency> getRouteFrequenciesByUserId(Integer userId);


    List<OrderDetails> getOrdersAndDriverInfo(Integer userId);

    List<OrderDetailsDriver> getOrdersAndUserInfo(Integer driverId);

    List<Orders> getOrderDetailsByUserId(Integer userId);

    List<Orders> getOrderDetailsByDriverId(Integer driverId);

    int countOrdersWithStatus5(Integer userId);

    List<Orders> getOrdersByUserId(Integer userId, String keyword,String keywordOrder);

    List<Orders> getOrdersByDriverId(Integer driverId, String keyword,String keywordOrder);

    List<Orders> getOrdersByManager(String keyword,String keywordOrder);

    Map<String, Object> getOrderStatistics();

    List<Map<String, Object>> getRanking(String timeRange);
}
